/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2021-10-07
 * Time: 21:23
 */
public class Book {
    private String name;
    private String author;
    private int price;
    private String type;
    private boolean isLent;

    public String getName() {
        return name;
    }

    public boolean isLent() {
        return isLent;
    }

    public void setLent(boolean lent) {
        isLent = lent;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                (isLent?" 未借出":" 已借出") +
                '}';
    }

    public Book(String name, String author, int price, String type) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }
}
